CentOS 6
Sponsored Link

Create RPM for Perl Module
2011/07/17
 
Create RPM for Perl Module.
[1] Install cpanflute
[root@dlp ~]#
yum --enablerepo=rpmforge -y install perl-RPM-Specfile
 
# install from RPMforge
[2] Get Perl module of tar.gz and Build RPM from SRPM.
[root@dlp ~]#
mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}

[root@dlp ~]#
cd /root/rpmbuild/SOURCES

[root@dlp SOURCES]#
wget http://search.cpan.org/CPAN/authors/id/D/DA/DANKOGAI/Jcode-2.07.tar.gz

[root@dlp SOURCES]#
cpanflute2 Jcode-2.07.tar.gz

Wrote: /root/rpmbuild/SRPMS/perl-Jcode-2.07-8.src.rpm
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.I9Pr4O
+ umask 022
+ cd /root/rpmbuild/BUILD
+ rm -rf Jcode-2.07
+ exit 0
[root@dlp SOURCES]#
cd ../SRPMS

[root@dlp SRPMS]#
rpmbuild --rebuild perl-Jcode-2.07-8.src.rpm

[root@dlp SRPMS]#
cd ../RPMS/x86_64

[root@dlp x86_64]#
rpm -Uvh perl-Jcode-2.07-8.x86_64.rpm

Preparing...                ########################################### [100%]
   1:perl-Jcode             ########################################### [100%]
[3] Create RPM directly from Perl module of tar.gz.
[root@dlp ~]#
cd /root/rpmbuild/SOURCES

[root@dlp SOURCES]#
wget http://search.cpan.org/CPAN/authors/id/E/ES/ESM/Net-NIS-0.43.tar.gz

[root@dlp SOURCES]#
cpanflute2 --buildall Net-NIS-0.43.tar.gz

[root@dlp SOURCES]#
cd ../RPMS/x86_64

[root@dlp x86_64]#
rpm -Uvh perl-Net-NIS-0.43-8.x86_64.rpm

Preparing...                ########################################### [100%]
   1:perl-Net-NIS           ########################################### [100%]
 
Tweet